#include <iostream>

using namespace std;
struct ListNode 
{
    int val;
    struct ListNode* next;
    ListNode(int x) : val(x), next(nullptr) {}
};

ListNode* oddEvenList(ListNode* head)
{
    // write code 
    ListNode* cur1 = new ListNode(-1);
    ListNode* tail1 = cur1;
    ListNode* cur2 = new ListNode(-1);
    ListNode* tail2 = cur2;
    int i = 0;
    while (head)
    {
        if (i % 2 == 0)
        {
            ListNode* temp = new ListNode(head->val);
            tail1->next = temp;
            tail1 = tail1->next;
        }
        else
        {
            ListNode* temp = new ListNode(head->val);
            tail2->next = temp;
            tail2 = tail2->next;
        }
        i++;
    }
    tail1->next = cur2->next;
    cur2->next = nullptr;
    tail2->next = nullptr;
    return cur1->next;
}
int main()
{

	retrun 0;
}